<?php


namespace App\Dao;


use App\Kernel\Traits\DaoTrait;
use App\Model\Express;

class ExpressDao
{
    use DaoTrait;


    /**
     * Get model.
     *
     * @return string
     */
    public function model(): string
    {
        return Express::class;
    }

    /**
     * 获得所有快递
     * @return mixed
     */
    public function getAllExpress()
    {
        return Express::all();
    }

    /**
     * 获得免费的快递
     * @return mixed
     */
    public function getFreeExpress()
    {
        return Express::query()->where('is_free', 1)->get();
    }


}